package com.red.wood.common.base.service;

import java.util.List;
import java.util.Map;

import com.red.wood.common.base.dao.MyBatisBaseDao;

public abstract class MyBatisBaseService<T> {
	
	public abstract MyBatisBaseDao<T> getMyBatisDao();
	
	public void insert(T t){
		getMyBatisDao().insert(t);
	}
	
	public void update(T t){
		getMyBatisDao().update(t);
	}
	
	public void delete(T t){
		getMyBatisDao().delete(t);
	}
	
	public void deleteById(Object id){
		getMyBatisDao().deleteById(id);
	}
	
	public List<T> queryList(Map<String,Object> param){
		return getMyBatisDao().queryList(param);
	}
	
	public T queryById(Object id){
		return getMyBatisDao().queryById(id);
	}
	
	public long queryCount(Map<String,Object> param){
		return getMyBatisDao().queryCount(param);
	}
}
